package factory;

/**
 * @author gaopeng
 * @date 2019/12/7 9:38 下午
 */
public class NvWa {

    public static void main(String[] args) {
        HumanFactory white = new WhiteHumanFactory();
        HumanFactory black = new BlackHumanFactory();
        HumanFactory yellow = new YellowHumanFactory();

        IHuman whiteFemaleHuman = white.createFemaleHuman();
        whiteFemaleHuman.getColor();
        whiteFemaleHuman.getLanguange();
        whiteFemaleHuman.getSex();

        IHuman blackMaleHuman = black.createMaleHuman();
        blackMaleHuman.getColor();
        blackMaleHuman.getLanguange();
        blackMaleHuman.getSex();

        IHuman yellowMaleHuman = yellow.createMaleHuman();
        yellowMaleHuman.getColor();
        yellowMaleHuman.getLanguange();
        yellowMaleHuman.getSex();

    }
}
